﻿using System;
using System.Collections.Generic;

namespace Donal.Xms.Model
{
    /// <summary>
    /// 订单表
    /// </summary>
    [Serializable]
    public partial class orders
    {
        public orders()
        { }

        #region Model

        /// <summary>
        ///  自增ID
        /// </summary>
        public int id { set; get; } = 0;
        /// <summary>
        ///  公司会员ID
        /// </summary>
        public int company_id { set; get; } = 0;
        /// <summary>
        ///  订单号
        /// </summary>
        public string order_no { set; get; } = string.Empty;
        /// <summary>
        ///  订单类型 0标准  1非标
        /// </summary>
        public int order_type { set; get; } = 0;
        /// <summary>
        ///  会员名称
        /// </summary>
        public string company_title { set; get; } = string.Empty;
        /// <summary>
        ///  会员类型
        /// </summary>
        public string company_type { set; get; } = string.Empty;
        /// <summary>
        ///  会员组别名称
        /// </summary>
        public string company_group { set; get; } = string.Empty;
        /// <summary>
        ///  用户名
        /// </summary>
        public string user_name { set; get; } = string.Empty;
        /// <summary>
        /// 审核 0未审核 1审核通过 2审核未过
        /// </summary>
        public int order_confirm { set; get; } = 0;
        /// <summary>
        ///  审核确认时间
        /// </summary>
        public DateTime? confirm_time { set; get; } = null;
        /// <summary>
        ///  商品总额
        /// </summary>
        public decimal goods_amount { set; get; } = 0m;
        /// <summary>
        ///  优惠券总金额
        /// </summary>
        public decimal coupons_amount { set; get; } = 0;
        /// <summary>
        ///  订单总金额
        /// </summary>
        public decimal order_amount { set; get; } = 0m;
        /// <summary>
        ///  优惠卷说明
        /// </summary>
        public string coupons_remark { set; get; } = string.Empty;
        /// <summary>
        ///  支付方式
        /// </summary>
        public string payment { set; get; } = "";
        /// <summary>
        ///  支付状态 0未支付 1已支付
        /// </summary>
        public int payment_status { set; get; } = 0;
        /// <summary>
        ///  支付时间
        /// </summary>
        public DateTime? payment_time { set; get; } = null;
        /// <summary>
        ///  订单备注
        /// </summary>
        public string remark { set; get; } = string.Empty;
        /// <summary>
        ///  省 市 县
        /// </summary>
        public string area_address { set; get; } = string.Empty;
        /// <summary>
        ///  收货地址
        /// </summary>
        public string accept_address { set; get; } = string.Empty;
        /// <summary>
        ///  收货人
        /// </summary>
        public string accepte_name { set; get; } = string.Empty;
        /// <summary>
        ///  收货人电话
        /// </summary>
        public string accepte_mobile { set; get; } = string.Empty;
        /// <summary>
        ///  发货方式 0自提 1快递
        /// </summary>
        public int express_type { set; get; } = 0;
        /// <summary>
        ///  发货状态 0未发货 1已发货 2部分发货
        /// </summary>
        public int express_status { set; get; } = 0;

        /// <summary>
        ///  订单状态 0入库订单 1待发货订单 2已完成订单 3未完成订单 4已发货订单 5未发货订单 6分批发货订单
        /// </summary>
        public int status { set; get; } = 0;
        /// <summary>
        ///  下单时间
        /// </summary>
        public DateTime? add_time { set; get; } = null;
        /// <summary>
        ///  限时取消时间，超过此时间未支付，还在销售审核的订单将被取消订单。
        /// </summary>
        public DateTime? over_time { set; get; } = null;
        /// <summary>
        ///  发货方式 0整单 1分单
        /// </summary>
        public int delivery { set; get; } = 0;
        /// <summary>
        /// 非标标识 0标准 1非标
        /// </summary>
        public int order_standard { set; get; } = 0;
        /// <summary>
        ///  订金
        /// </summary>
        public decimal deposit { set; get; } = 0;
        /// <summary>
        ///  是否要订金 0否 1是
        /// </summary>
        public int deposit_need { set; get; } = 0;
        /// <summary>
        ///  订金是否已交 0否 1是
        /// </summary>
        public int deposit_paymented { set; get; } = 0;
        /// <summary>
        ///  支付金额
        /// </summary>
        public decimal payment_amount { set; get; } = 0;
        /// <summary>
        ///  订金支付ID
        /// </summary>
        public int deposit_paymented_id { set; get; } = 0;
        /// <summary>
        ///  订单支付ID
        /// </summary>
        public int paymented_id { set; get; } = 0;

        /// <summary>
        ///  删除标记 0正常 1已删除
        /// </summary>
        public int is_del { set; get; } = 0;

        /// <summary>
        /// 发货列表
        /// </summary>
        public List<orders_express> orders_express { set; get; }

        /// <summary>
        /// 发票列表
        /// </summary>
        public List<orders_invoice> orders_invoice { set; get; }

        /// <summary>
        /// 商品列表
        /// </summary>
        public List<order_goods> order_goods { set; get; }
        
        #endregion
    }
}